package com.xxl.job.executor.constants;

/**
 * @Author: jamnsin
 * @Date: 2022/5/28 20:32
 */
public class Constants {

    public static final String CURRENT_NAME = "monnifyExtApiRetry_run";

    /**
     * 拆分代扣数组
     */
    public static final Double[] SPLIT_WITHHOLDING_ARRAY = new Double[]{1.0, 0.2, 0.3, 0.5};

    /**
     * 短信通知类型
     */
    public static final String SMS_NOTICE_TYPE_CODE = "code";
    public static final String SMS_NOTICE_TYPE_NOTICE = "notice";
    public static final String SMS_NOTICE_TYPE_REPAYMENT = "repayment";
    public static final String SMS_NOTICE_TYPE_MARKET = "market";
    public static final String SMS_NOTICE_TYPE_COLLECT = "collect";
    public static final String SMS_NOTICE_TYPE_RECALL = "recall";

    public static final String SMS_TYPE_REGISTER = "register";
    public static final String SMS_TYPE_RESET_PWD = "reset_pwd";
    public static final String SMS_TYPE_REAL_NAME_AUTH = "real_name_auth";
    public static final String SMS_TYPE_CREDIT_PASS = "credit_pass";
    public static final String SMS_TYPE_LOAN_SUCCESS = "loan_success";
    public static final String SMS_TYPE_LOAN_FAILED = "loan_failed";
    public static final String SMS_TYPE_BALANCE_INSUFFICIENT = "balance_insufficient";
    public static final String SMS_TYPE_WITHHOLD_SUCCESS = "withhold_success";
    public static final String SMS_TYPE_WITHHOLD_FAILED = "withhold_failed";

    public static final String SMS_TYPE_RAISE_LIMIT_END_LESS_PRE = "raise_limit_end_less_pre";
    public static final String SMS_TYPE_RAISE_LIMIT_END_EQUAL_PRE = "raise_limit_end_equal_pre";
    public static final String SMS_TYPE_RAISE_LIMIT_END_GREATER_PRE = "raise_limit_end_greater_pre";

    public static final String SMS_TYPE_WITHHOLD_SETTLE = "withhold_finish";
    public static final String SMS_TYPE_WITHHOLD_WAIT_SUCCESS = "withhold_outstanding_success";
    public static final String SMS_TYPE_WITHHOLD_OVERDUE_SUCCESS = "withhold_overdue_success";
    public static final String SMS_TYPE_WITHHOLD_WAIT_FAILED = "withhold_outstanding_failed";
    public static final String SMS_TYPE_WITHHOLD_OVERDUE_FAILED = "withhold_overdue_failed";
    public static final String SMS_TYPE_REPAYMENT_FINISH = "repayment_finish";
    public static final String SMS_TYPE_REPAYEMNT_OUTSTADING = "repayment_outstanding";
    public static final String SMS_TYPE_REPAYMENT_OVERDUE = "repayment_overdue";

    public static final String SMS_TYPE_DAYS_TO_REPAYMENT = "days_to_repayment";
    public static final String SMS_TYPE_OVERDUE_1_DAY = "overdue_1_day";
    public static final String SMS_TYPE_OVERDUE_3_DAY = "overdue_3_day";
    public static final String SMS_TYPE_REPAYMENT_ACCOUNT = "repayment_account";
    public static final String SMS_TYPE_CUSTRVWRESULT_CLOSE = "custrvwresult_close";
    public static final String SMS_TEMPLATE_INCREASE_CREDIT_LINE = "increase_credit_line";

    public static final String SMS_TEMPLATE_WDRW_FAIL_SRY = "temp_wdrw_fail_sry";
    public static final String SMS_MONIFY_TRY_FAIL_SRY = "temp_rpyacct_fail_sry";
    public static final String SMS_MONIFY_TRY_PROC_RE = "temp_rpytacct_proc_re";


    public static final String SMS_TYPE_REPAYMENT_T_N = "repayment_T-N";
    public static final String SMS_TYPE_REPAYMENT_T_1 = "repayment_T-1";
    public static final String SMS_TYPE_REPAYMENT_T_0 = "repayment_T+0";
    public static final String SMS_TYPE_REPAYMENT_T_M1 = "repayment_T+1";
    public static final String SMS_TYPE_REPAYMENT_T_M3 = "repayment_T+3";
    public static final String SMS_TYPE_REPAYMENT_T_M5 = "repayment_T+5";

    //
    public static final String SMS_TYPE_INCR_RAISE_UN_FREEZE = "limit_incr_info_unfrez";
    public static final String SMS_TYPE_INCR_RAISE_EFF = "limit_incr_info_eff";
    public static final String SMS_TYPE_INCR_RAISE_REJ = "limit_incr_info_rej";
    public static final String SMS_TYPE_CARD_RAISE_UN_FREEZE = "limit_incr_cardbind_unfrez";
    public static final String SMS_TYPE_CARD_RAISE_EFF = "limit_incr_cardbind_eff";
    public static final String SMS_TYPE_CARD_RAISE_REJ = "limit_incr_cardbind_rej";


    /**
     * andon模版
     */
    public static final String ANDON_CREDIT = "andon-credit";
    public static final String ANDON_LOAN = "andon-loan";

    /**
     * 邀请码短信模版
     */
    public static final String SMS_TYPE_INVITER_REGISTER = "inviter-register";
    public static final String SMS_TYPE_INVITER_CREDIT = "inviter-credit";

    /**
     * 提额提醒模版类型
     */
    public static final String SMS_TYPE_RAISE_LIMIT_REMIND_T_3 = "raise_limit_remind_T-3";
    public static final String SMS_TYPE_RAISE_LIMIT_REMIND_T_0 = "raise_limit_remind_T-0";
    public static final String SMS_TYPE_RAISE_LIMIT_REMIND_NO_LOAN = "raise_limit_remind_not_loan";


    public static final String APP_ID = "PDL_APP";
    /**
     * Redis
     */
    public static final String REAL_NAME_PHONE = "real_name:phone_";
    public static final String REAL_NAME_BVN = "real_name:bvn_";
    public static final String LOAN_REPAY_CARD = "loan_repay:card_";
    public static final String ONE_PIPE_INCR_NO = "one_pipe:incr_no_";

    /**
     * register 检查失败次数 redisKey
     */
    public static final String REGISTER_CHECK_FAIL_COUNT = "registerCheckFailCount:";

    public static final String TRANSACTION_THREAD = "transaction-thread:";//card,ussd,3小时轮询线程
    public static final String TRANSFER_TO_US_THREAD = "transfer-to-us-thread:";//transfer-to-us 3小时轮询线程
    public static final String TRANSACTION_TASK_DATA = "Transaction-Task-Data";//card,ussd跑批时数据
    public static final String TRANSFER_TO_US_TASK_DATA = "Transfer-To-Us-Task-Data";//Transfer-To-Us跑批时数据

    /**
     * thread
     */
    public static final String TRANSFER_TO_US_THREAD_NAME = "transfer-to-us-thread-";//ransfer-to-us 3小时轮询线程名称
    public static final String TRANSACTION_THREAD_NAME = "transaction-thread-";//card,ussd,3小时轮询线程名称

    //操作类型actionType
    public static final String ACTION_TYPE_REGISTER = "register";
    public static final String ACTION_TYPE_PASSWORD_LOGIN = "password_Login";
    public static final String ACTION_TYPE_SMS_LOGIN = "sms_login";
    public static final String ACTION_TYPE_APPLY = "apply";
    public static final String ACTION_TYPE_LOAN = "loan";
    public static final String ACTION_TYPE_REPAYMENT = "repayment";
    public static final String ACTION_TYPE_REAL_NAME = "real_name";

    public static final int APPLY_STATUS_11_INFO_ENTRY_SUPPLEMENT = 11;
    public static final int APPLY_STATUS_9_APPROVALING = 9;
    public static final int APPLY_STATUS_0_REFUSED = 0;
    public static final int APPLY_STATUS_1_PASSED = 1;
    public static final int APPLY_STATUS_10_CANCEL = 10;

    public static final String BIZ_STATUS_0 = "0";
    public static final String BIZ_STATUS_1 = "1";

    public static final String ACCOUNT_ON_lOAN_STATUS_1 = "1";//在贷
    public static final String ACCOUNT_ON_lOAN_STATUS_0 = "0";//不在贷

    /**
     * 实名Log惩罚期
     */
    public static final String REAL_NAME_LOG_FAIL = "0";
    /**
     * 实名Log正常
     */
    public static final String REAL_NAME_LOG_NORMAL = "1";
    /**
     * 实名Log 不计入当天实名次数
     */
    public static final String REAL_NAME_LOG_SKIP = "2";


    // 提现订单状态
    public static final int LOAN_STATUS_9_APPROVALING = 9;
    public static final int LOAN_STATUS_1o_CANCEL = 10;
    public static final int LOAN_STATUS_0_APPROVE_REFUSED = 0;
    public static final int LOAN_STATUS_1_APPROVE_PASSED = 1;
    public static final int LOAN_STATUS_2_INSUFFICIENT_ACCOUNT_BALANCE = 2;
    public static final int LOAN_STATUS_3_LOAN_PENDING = 3;
    public static final int LOAN_STATUS_4_LOAN_SUCCESS = 4;
    public static final int LOAN_STATUS_5_LOAN_FAILED = 5;
    public static final int LOAN_STATUS_6_RE_INITIATE_PAY = 6;
    public static final int LOAN_STATUS_7_CONTRAC_NO_GENERATED = 7;
    public static final int LOAN_STATUS_8_CLOSE = 8;

    public static final String DATE_BATCH_FAIL_STATUS_SUCCESS = "0";//成功
    public static final String DATE_BATCH_FAIL_STATUS_FALSE = "1";//失败

    public static final String LOAN_ORDER_DICT_TYPE = "loan_status";
    public static final String LOAN_IOU_DICT_TYPE = "loan_iou_status";

    public static final int LOAN_IOU_STATUS_WAIT = 0;//待还款
    public static final int LOAN_IOU_STATUS_SETTLE = 1;//结清
    public static final int LOAN_IOU_STATUS_OVERDUE = 2;//逾期

    public static final int LOAN_OFFSET_STATUS_FAIL = 0;//冲账失败
    public static final int LOAN_OFFSET_STATUS_SUCCESS = 1;//冲账成功
    public static final int LOAN_OFFSET_STATUS_WAIT = 2;//待冲账

    //代扣类别
    public static final String LOAN_REPAYMENT_ORDER_TYPE_OPERATE = "Operate";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_COLLECTION = "Collection";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_DATE_BATCH = "DateBatch";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_DATE_BATCH_FAIL = "DateBatchFail";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_USSD = "USSD";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_TTS = "Monnify-Transfer";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_CARD = "Monnify-Card";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_QUICK = "Quick-repay";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_SYSTEM_REDUCE = "System-Reduce";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_OVERFLOW = "Overflow";
    public static final String LOAN_REPAYMENT_ORDER_TYPE_QR_REDUCE = "QuickRepayReduce";


    //代扣订单结果状态
    public static final int REPAYMENT_ORDER_STATUS_FAIL = 0;
    public static final int REPAYMENT_ORDER_STATUS_SUCCESS = 1;
    public static final int REPAYMENT_ORDER_STATUS_WAIT = 2;
    public static final int REPAYMENT_ORDER_STATUS_DOING = 5;

    // 绑卡
    public static final String BIND_CARD_GET_AUTH_URL = "2";
    public static final String BIND_CARD_WAIT_CUST_SUBMIT = "3";
    public static final String BIND_CARD_TRANS_SUCCESS = "1";
    public static final String BIND_CARD_TRANS_PENDING = "9";
    public static final String BIND_CARD_TRANS_FAILED = "0";
    public static final String BIND_CARD_TRANS_TIMEOUT = "4";
    public static final String BIND_CARD_BY_OHTERS = "5";
    public static final String BIND_CARD_GET_AUTH_URL_ERR = "6";
    public static final String BIND_CARD_REPEAT_OPERATION = "7";
    public static final String BIND_CARD_CANCEL_CUST_SUBMIT = "8";

    public static final String DEFAULT_COUNTRY_CODE = "+234";

    // 交易事件类型
    public static final String TRANSFER_EVENT_BIND_CARD = "bind";
    public static final String TRANSFER_EVENT_PAYMENT = "transfer";
    public static final String TRANSFER_EVENT_CHARGE = "charge";

    //monnfiy订单表类型
    public static final String MONNFIY_ORDER_TYPE_USSD = "USSD";
    public static final String MONNFIY_ORDER_TYPE_CARD = "CARD";
    public static final String MONNFIY_ORDER_TYPE_TTS = "TransferToUs";
    public static final String MONNFIY_ORDER_TYPE_WEBHOOK_USSD = "WEBHOOK_USSD";
    public static final String MONNFIY_ORDER_TYPE_WEBHOOK_CARD = "WEBHOOK_CARD";
    public static final String MONNFIY_ORDER_TYPE_WEBHOOK_TTS = "WEBHOOK_TransferToUs";

    //overflow
    public static final String OVERFLOW_TYPE_REPEAT_TRANSFERTOUS = "monnify-repeat";
    public static final String OVERFLOW_TYPE_OVERFLOW_TRANSFERTOUS = "monnify";
    public static final String OVERFLOW_TYPE_OVERFLOW_WITHHOLD = "paystack";
    public static final String OVERFLOW_TYPE_REPEAT_WITHHOLD = "paystack-repeat";
    public static final String OVERFLOW_TYPE_REPEAT_BINDBANK = "bind-card";
    public static final String OVERFLOW_TYPE_OVERFLOW_REPAYMENT = "repayment";

    public static final Integer OVERFLOW_CHANGE_TYPE_ADD = 1;
    public static final Integer OVERFLOW_CHANGE_TYPE_SUB = 2;

    //客户账户锁
    public static final String CUST_ACCOUNT_LOCK_KEY_PREFIX = "ACCOUNT-";
    public static final String BANK_CARD_LOCK_KEY_PREFIX = "BindCard-";
    public static final String LOAN_LOCK_KEY_PREFIX = "Loan-";
    //获取客户账户锁的重试次数
    public static final int CUST_ACCOUNT_LOCK_REGET_COUNT = 3;
    //获取客户账户锁繁忙等待时间
    public static final int CUST_ACCOUNT_LOCK_SLEEP_TIME = 4 * 1000;

    //溢缴使用状态
    public static final int OVERFLOW_USE_STATUS_USABLE = 1;//可用
    public static final int OVERFLOW_USE_STATUS_DISABLE = 2;//不可用


    public static final String CREDIT_FLAG_STATUS_NORMAL = "0";
    public static final String CREDIT_FLAG_STATUS_FAIL = "1";

    //监控redis名称
    public static final String MONITOR_COUNTNUMS = "-Monitor-CountNums";//总数
    public static final String MONITOR_FAILNUMS = "-Monitor-FailNums";//失败数量
    public static final String MONITOR_LOGS = "-Monitor-Logs";//日志


    //推送url
    public static final String PUSH_URL_HOME = "Home";

    //推送类型
    public static final String PUSH_TYPE_SCORE = "Score";

    //冲账异常类型
    public static final String REPAYMENT_EXCEPTION_TYPE_MONNIFY = "monnify";
    public static final String REPAYMENT_EXCEPTION_TYPE_PAYSTACK = "paystack";


    //faq  redis名称
    public static final String FAQ_REDIS_NAME = "faq:";
    public static final String PRODUCT_ACTIVE_REDIS_NAME = "product:active";
    public static final String PRODUCT_DEFAULT_REDIS_NAME = "product:default";
    public static final String PRODUCT_REVIEW_REDIS_NAME = "product:review";


    public static final String ANDON_TYPE_CREDDIT = "credit";
    public static final String ANDON_TYPE_LOAN = "loan";
    public static final String ANDON_TYPE_BINDCARD = "bindCard";

    public static final String RULE_TYPE_APPLY = "apply";
    public static final String RULE_TYPE_LOAN = "loan";
}
